import request from "@/utils/request"

// 分页查询
export function myDataList(data, page, size) {
  return request({
    url: `/dataManage/page/${page}/${size}`,
    method: "post",
    data
  })
}

// 上传
export function myDataUpload(data) {
  return request({
    url: `/dataManage/uploadExcel`,
    method: "post",
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data
  })
}

// 启用
export function myDataUse(id) {
  return request({
    url: `/dataManage/dataUse/${id}`,
    method: "post",
    data: {}
  })
}

// 预览
export function myDataPreview(id, page, size) {
  return request({
    url: `/dataManage/dataPreview/${id}/${page}/${size}`,
    method: "get",
  })
}

// 导出
export function myDataExp(id) {
  return request({
    url: `/dataManage/dataExp/${id}`,
    method: "get",
    responseType: 'blob',
  })
}

// 删除
export function myDataDel(id) {
  return request({
    url: `/dataManage/del/${id}`,
    method: "post",
  })
}
